<?php

define('IN_OS', true);

require(dirname(__FILE__) . '/includes/init.php');
require(ROOT_PATH . '/includes/modules/taobao.api/cls_api.php');
$exc = new exchange($os->table('taobao_goods'), $db, 'goods_id', 'goods_sn');

if ($_REQUEST['act'] == 'list'){	
	//检查权限
	admin_priv();
	
	$obj_api = new taobao_api();
	$obj_api->api_method = 'taobao.trades.sold.get';
	$obj_api->api_fields ='seller_nick,buyer_nick,title,type,created,sid,tid,seller_rate,buyer_rate,status,payment,
	                       discount_fee, adjust_fee,post_fee,pay_time,end_time,consign_time,modified,buyer_obtain_point_fee,
	                       point_fee, real_point_fee,received_payment,pic_path,iid,num,price,cod_fee,shipping_type';
	$smarty->assign('order_items', $obj_api->fetchItems('trade'));
	
    assign_query_info();
    
    $smarty->display('api_tb_order_list.tpl');
}elseif($_REQUEST['act'] == 'get_item'){
	
}
?>